load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
load("@fbcode_macros//build_defs:cpp_benchmark.bzl", "cpp_benchmark")
load("@fbcode_macros//build_defs:cpp_binary.bzl", "cpp_binary")
load("@fbcode_macros//build_defs:cpp_unittest.bzl", "cpp_unittest")
load(
    "@fbsource//tools/build_defs:platform_defs.bzl",
    "ANDROID",
    "APPLE",
    "CXX",
    "WINDOWS",
)
load("@fbsource//tools/build_defs/dirsync:fb_dirsync_cpp_library.bzl", "fb_dirsync_cpp_library")
load("@fbsource//xplat/pfh/triage_InfrastructureSupermoduleOptou:DEFS.bzl", "triage_InfrastructureSupermoduleOptou")
load(
    "../../defs.bzl",
    "FBANDROID_CXXFLAGS",
    "FBOBJC_CXXFLAGS",
    "folly_xplat_cxx_test",
    "folly_xplat_library",
)

oncall("fbcode_entropy_wardens_folly")

non_fbcode_target(
    _kind = folly_xplat_cxx_test,
    name = "f14_set-test",
    srcs = [
        "F14SetTest.cpp",
    ],
    fbandroid_compiler_flags = FBANDROID_CXXFLAGS,
    fbobjc_compiler_flags = FBOBJC_CXXFLAGS + [
        "-Wno-format",
        "-Wno-missing-prototypes",
        "-Wno-shadow",
    ],
    include_directories = [
        "..",
    ],
    platforms = (ANDROID, APPLE, CXX, WINDOWS),
    use_instrumentation_test = True,
    deps = [
        "fbsource//third-party/boost:boost",
        "fbsource//third-party/boost:boost_filesystem",
        "fbsource//third-party/boost:boost_system",
        "fbsource//third-party/double-conversion:double-conversion",
        "fbsource//third-party/glog:glog",
        "fbsource//xplat/folly:atomic_hash_map",
        "fbsource//xplat/folly:atomic_linked_list",
        "fbsource//xplat/folly:c_portability",
        "fbsource//xplat/folly:chrono",
        "fbsource//xplat/folly:config",
        "fbsource//xplat/folly:constexpr_math",
        "fbsource//xplat/folly:conv",
        "fbsource//xplat/folly:cpp_attributes",
        "fbsource//xplat/folly:demangle",
        "fbsource//xplat/folly:discriminated_ptr",
        "fbsource//xplat/folly:dynamic",
        "fbsource//xplat/folly:exception",
        "fbsource//xplat/folly:exception_string",
        "fbsource//xplat/folly:executor",
        "fbsource//xplat/folly:expected",
        "fbsource//xplat/folly:fbstring",
        "fbsource//xplat/folly:fbvector",
        "fbsource//xplat/folly:file",
        "fbsource//xplat/folly:format",
        "fbsource//xplat/folly:format_traits",
        "fbsource//xplat/folly:function",
        "fbsource//xplat/folly:glog",
        "fbsource//xplat/folly:indestructible",
        "fbsource//xplat/folly:indexed_mem_pool",
        "fbsource//xplat/folly:intrusive_list",
        "fbsource//xplat/folly:likely",
        "fbsource//xplat/folly:math",
        "fbsource//xplat/folly:memory",
        "fbsource//xplat/folly:micro_lock",
        "fbsource//xplat/folly:move_wrapper",
        "fbsource//xplat/folly:mpmc_queue",
        "fbsource//xplat/folly:observer_container",
        "fbsource//xplat/folly:optional",
        "fbsource//xplat/folly:overload",
        "fbsource//xplat/folly:portability",
        "fbsource//xplat/folly:preprocessor",
        "fbsource//xplat/folly:random",
        "fbsource//xplat/folly:range",
        "fbsource//xplat/folly:scope_guard",
        "fbsource//xplat/folly:shared_mutex",
        "fbsource//xplat/folly:singleton",
        "fbsource//xplat/folly:singleton_thread_local",
        "fbsource//xplat/folly:small_vector",
        "fbsource//xplat/folly:sorted_vector_types",
        "fbsource//xplat/folly:spin_lock",
        "fbsource//xplat/folly:stop_watch",
        "fbsource//xplat/folly:synchronized",
        "fbsource//xplat/folly:thread_local",
        "fbsource//xplat/folly:traits",
        "fbsource//xplat/folly:unit",
        "fbsource//xplat/folly/concurrency:cache_locality",
        "fbsource//xplat/folly/concurrency:concurrent_hash_map",
        "fbsource//xplat/folly/concurrency:priority_unbounded_queue_set",
        "fbsource//xplat/folly/concurrency:unbounded_queue",
        "fbsource//xplat/folly/container:array",
        "fbsource//xplat/folly/container:bit_iterator",
        "fbsource//xplat/folly/container:enumerate",
        "fbsource//xplat/folly/container:evicting_cache_map",
        "fbsource//xplat/folly/container:f14_hash",
        "fbsource//xplat/folly/container:foreach",
        "fbsource//xplat/folly/container:heap_vector_types",
        "fbsource//xplat/folly/container:iterator",
        "fbsource//xplat/folly/container:sparse_byte_set",
        "fbsource//xplat/folly/detail:discriminated_ptr_detail",
        "fbsource//xplat/folly/detail:futex",
        "fbsource//xplat/folly/detail:socket_fast_open",
        "fbsource//xplat/folly/detail:turn_sequencer",
        "fbsource//xplat/folly/executors:cpu_thread_pool_executor",
        "fbsource//xplat/folly/executors:global_executor",
        "fbsource//xplat/folly/executors:inline_executor",
        "fbsource//xplat/folly/executors:io_thread_pool_executor",
        "fbsource//xplat/folly/executors:serial_executor",
        "fbsource//xplat/folly/executors/task_queue:priority_lifo_sem_mpmc_queue",
        "fbsource//xplat/folly/executors/task_queue:priority_unbounded_blocking_queue",
        "fbsource//xplat/folly/executors/task_queue:unbounded_blocking_queue",
        "fbsource//xplat/folly/fibers:core",
        "fbsource//xplat/folly/fibers:event_base_loop_controller",
        "fbsource//xplat/folly/fibers:fiber_manager_map",
        "fbsource//xplat/folly/functional:apply_tuple",
        "fbsource//xplat/folly/functional:invoke",
        "fbsource//xplat/folly/functional:partial",
        "fbsource//xplat/folly/io:iobuf",
        "fbsource//xplat/folly/io:typed_io_buf",
        "fbsource//xplat/folly/io/async:async_base",
        "fbsource//xplat/folly/io/async:async_pipe",
        "fbsource//xplat/folly/io/async:async_signal_handler",
        "fbsource//xplat/folly/io/async:async_socket",
        "fbsource//xplat/folly/io/async:async_socket_base",
        "fbsource//xplat/folly/io/async:async_socket_exception",
        "fbsource//xplat/folly/io/async:async_ssl_socket",
        "fbsource//xplat/folly/io/async:async_transport",
        "fbsource//xplat/folly/io/async:async_transport_certificate",
        "fbsource//xplat/folly/io/async:async_udp_server_socket",
        "fbsource//xplat/folly/io/async:async_udp_socket",
        "fbsource//xplat/folly/io/async:decorated_async_transport_wrapper",
        "fbsource//xplat/folly/io/async:destructor_check",
        "fbsource//xplat/folly/io/async:scoped_event_base_thread",
        "fbsource//xplat/folly/io/async:server_socket",
        "fbsource//xplat/folly/io/async:ssl_context",
        "fbsource//xplat/folly/io/async:ssl_options",
        "fbsource//xplat/folly/io/async/ssl:basic_transport_certificate",
        "fbsource//xplat/folly/io/async/ssl:openssl_utils",
        "fbsource//xplat/folly/io/async/ssl:ssl_errors",
        "fbsource//xplat/folly/io/async/ssl:tls_definitions",
        "fbsource//xplat/folly/lang:bits",
        "fbsource//xplat/folly/lang:checked_math",
        "fbsource//xplat/folly/lang:exception",
        "fbsource//xplat/folly/lang:rvalue_reference_wrapper",
        "fbsource//xplat/folly/lang:uncaught_exceptions",
        "fbsource//xplat/folly/logging:init",
        "fbsource//xplat/folly/logging:init_weak",
        "fbsource//xplat/folly/logging:log_handler",
        "fbsource//xplat/folly/logging:log_level",
        "fbsource//xplat/folly/logging:log_name",
        "fbsource//xplat/folly/logging:logging",
        "fbsource//xplat/folly/logging:rate_limiter",
        "fbsource//xplat/folly/memory:arena",
        "fbsource//xplat/folly/memory:malloc",
        "fbsource//xplat/folly/net:tcpinfo",
        "fbsource//xplat/folly/net:tcpinfo_dispatcher",
        "fbsource//xplat/folly/portability:asm",
        "fbsource//xplat/folly/portability:atomic",
        "fbsource//xplat/folly/portability:builtins",
        "fbsource//xplat/folly/portability:dirent",
        "fbsource//xplat/folly/portability:event",
        "fbsource//xplat/folly/portability:fcntl",
        "fbsource//xplat/folly/portability:gflags",
        "fbsource//xplat/folly/portability:gmock",
        "fbsource//xplat/folly/portability:gtest",
        "fbsource//xplat/folly/portability:iovec",
        "fbsource//xplat/folly/portability:math",
        "fbsource//xplat/folly/portability:openssl",
        "fbsource//xplat/folly/portability:pthread",
        "fbsource//xplat/folly/portability:stdlib",
        "fbsource//xplat/folly/portability:sys_mman",
        "fbsource//xplat/folly/portability:sys_resource",
        "fbsource//xplat/folly/portability:sys_stat",
        "fbsource//xplat/folly/portability:sys_syscall",
        "fbsource//xplat/folly/portability:sys_time",
        "fbsource//xplat/folly/portability:syslog",
        "fbsource//xplat/folly/portability:time",
        "fbsource//xplat/folly/portability:windows",
        "fbsource//xplat/folly/ssl:openssl_cert_utils",
        "fbsource//xplat/folly/ssl:openssl_hash",
        "fbsource//xplat/folly/ssl:openssl_ptr_types",
        "fbsource//xplat/folly/ssl:ssl_session",
        "fbsource//xplat/folly/ssl:ssl_session_manager",
        "fbsource//xplat/folly/synchronization:call_once",
        "fbsource//xplat/folly/synchronization:hazptr",
        "fbsource//xplat/folly/synchronization:lifo_sem",
        "fbsource//xplat/folly/synchronization:micro_spin_lock",
        "fbsource//xplat/folly/synchronization:pico_spin_lock",
        "fbsource//xplat/folly/synchronization:rcu",
        "fbsource//xplat/folly/synchronization:small_locks",
        "fbsource//xplat/folly/system:thread_id",
        "fbsource//xplat/folly/system:thread_name",
        "fbsource//xplat/folly/tracing:scoped_trace_section",
        "fbsource//xplat/folly/tracing:static_tracepoint",
        "fbsource//xplat/third-party/event:event",
        "fbsource//xplat/third-party/linker_lib:atomic",
        "fbsource//xplat/third-party/openssl:crypto",
        "fbsource//xplat/third-party/openssl:ssl",
        ":f14_test_util",
        ":tracking_types",
        "//xplat/folly:benchmark",
        "//xplat/folly:conv",
        "//xplat/folly:fbstring",
        "//xplat/folly:portability",
        "//xplat/folly:test-headers",
        "//xplat/folly:test_test_utils",
        "//xplat/folly/container:f14_hash",
        "//xplat/folly/lang:keep",
        "//xplat/third-party/linker_lib:atomic",
    ],
    exported_deps = [
        "fbsource//xplat/folly/hash:hash",
        "fbsource//xplat/folly/portability:asm",
        "//xplat/folly:function",
        "//xplat/folly/container/detail:f14_hash_detail",
        "//xplat/folly/lang:safe_assert",
    ],
)

non_fbcode_target(
    _kind = folly_xplat_cxx_test,
    name = "f14_map-test",
    srcs = [
        "F14MapTest.cpp",
    ],
    fbandroid_compiler_flags = FBANDROID_CXXFLAGS,
    fbobjc_compiler_flags = FBOBJC_CXXFLAGS + [
        "-Wno-format",
        "-Wno-missing-prototypes",
        "-Wno-shadow",
    ],
    include_directories = [
        "..",
    ],
    platforms = (ANDROID, APPLE, CXX, WINDOWS),
    use_instrumentation_test = True,
    deps = [
        "fbsource//third-party/boost:boost",
        "fbsource//third-party/boost:boost_filesystem",
        "fbsource//third-party/boost:boost_system",
        "fbsource//third-party/double-conversion:double-conversion",
        "fbsource//third-party/glog:glog",
        "fbsource//xplat/folly:atomic_hash_map",
        "fbsource//xplat/folly:atomic_linked_list",
        "fbsource//xplat/folly:c_portability",
        "fbsource//xplat/folly:chrono",
        "fbsource//xplat/folly:config",
        "fbsource//xplat/folly:constexpr_math",
        "fbsource//xplat/folly:conv",
        "fbsource//xplat/folly:cpp_attributes",
        "fbsource//xplat/folly:demangle",
        "fbsource//xplat/folly:discriminated_ptr",
        "fbsource//xplat/folly:dynamic",
        "fbsource//xplat/folly:exception",
        "fbsource//xplat/folly:exception_string",
        "fbsource//xplat/folly:executor",
        "fbsource//xplat/folly:expected",
        "fbsource//xplat/folly:fbstring",
        "fbsource//xplat/folly:fbvector",
        "fbsource//xplat/folly:file",
        "fbsource//xplat/folly:format",
        "fbsource//xplat/folly:format_traits",
        "fbsource//xplat/folly:function",
        "fbsource//xplat/folly:glog",
        "fbsource//xplat/folly:indestructible",
        "fbsource//xplat/folly:indexed_mem_pool",
        "fbsource//xplat/folly:intrusive_list",
        "fbsource//xplat/folly:likely",
        "fbsource//xplat/folly:math",
        "fbsource//xplat/folly:memory",
        "fbsource//xplat/folly:micro_lock",
        "fbsource//xplat/folly:move_wrapper",
        "fbsource//xplat/folly:mpmc_queue",
        "fbsource//xplat/folly:observer_container",
        "fbsource//xplat/folly:optional",
        "fbsource//xplat/folly:overload",
        "fbsource//xplat/folly:portability",
        "fbsource//xplat/folly:preprocessor",
        "fbsource//xplat/folly:random",
        "fbsource//xplat/folly:range",
        "fbsource//xplat/folly:scope_guard",
        "fbsource//xplat/folly:shared_mutex",
        "fbsource//xplat/folly:singleton",
        "fbsource//xplat/folly:singleton_thread_local",
        "fbsource//xplat/folly:small_vector",
        "fbsource//xplat/folly:sorted_vector_types",
        "fbsource//xplat/folly:spin_lock",
        "fbsource//xplat/folly:stop_watch",
        "fbsource//xplat/folly:synchronized",
        "fbsource//xplat/folly:thread_local",
        "fbsource//xplat/folly:traits",
        "fbsource//xplat/folly:unit",
        "fbsource//xplat/folly/concurrency:cache_locality",
        "fbsource//xplat/folly/concurrency:concurrent_hash_map",
        "fbsource//xplat/folly/concurrency:priority_unbounded_queue_set",
        "fbsource//xplat/folly/concurrency:unbounded_queue",
        "fbsource//xplat/folly/container:array",
        "fbsource//xplat/folly/container:bit_iterator",
        "fbsource//xplat/folly/container:enumerate",
        "fbsource//xplat/folly/container:evicting_cache_map",
        "fbsource//xplat/folly/container:f14_hash",
        "fbsource//xplat/folly/container:foreach",
        "fbsource//xplat/folly/container:heap_vector_types",
        "fbsource//xplat/folly/container:iterator",
        "fbsource//xplat/folly/container:sparse_byte_set",
        "fbsource//xplat/folly/detail:discriminated_ptr_detail",
        "fbsource//xplat/folly/detail:futex",
        "fbsource//xplat/folly/detail:socket_fast_open",
        "fbsource//xplat/folly/detail:turn_sequencer",
        "fbsource//xplat/folly/executors:cpu_thread_pool_executor",
        "fbsource//xplat/folly/executors:global_executor",
        "fbsource//xplat/folly/executors:inline_executor",
        "fbsource//xplat/folly/executors:io_thread_pool_executor",
        "fbsource//xplat/folly/executors:serial_executor",
        "fbsource//xplat/folly/executors/task_queue:priority_lifo_sem_mpmc_queue",
        "fbsource//xplat/folly/executors/task_queue:priority_unbounded_blocking_queue",
        "fbsource//xplat/folly/executors/task_queue:unbounded_blocking_queue",
        "fbsource//xplat/folly/fibers:core",
        "fbsource//xplat/folly/fibers:event_base_loop_controller",
        "fbsource//xplat/folly/fibers:fiber_manager_map",
        "fbsource//xplat/folly/functional:apply_tuple",
        "fbsource//xplat/folly/functional:invoke",
        "fbsource//xplat/folly/functional:partial",
        "fbsource//xplat/folly/io:iobuf",
        "fbsource//xplat/folly/io:typed_io_buf",
        "fbsource//xplat/folly/io/async:async_base",
        "fbsource//xplat/folly/io/async:async_pipe",
        "fbsource//xplat/folly/io/async:async_signal_handler",
        "fbsource//xplat/folly/io/async:async_socket",
        "fbsource//xplat/folly/io/async:async_socket_base",
        "fbsource//xplat/folly/io/async:async_socket_exception",
        "fbsource//xplat/folly/io/async:async_ssl_socket",
        "fbsource//xplat/folly/io/async:async_transport",
        "fbsource//xplat/folly/io/async:async_transport_certificate",
        "fbsource//xplat/folly/io/async:async_udp_server_socket",
        "fbsource//xplat/folly/io/async:async_udp_socket",
        "fbsource//xplat/folly/io/async:decorated_async_transport_wrapper",
        "fbsource//xplat/folly/io/async:destructor_check",
        "fbsource//xplat/folly/io/async:scoped_event_base_thread",
        "fbsource//xplat/folly/io/async:server_socket",
        "fbsource//xplat/folly/io/async:ssl_context",
        "fbsource//xplat/folly/io/async:ssl_options",
        "fbsource//xplat/folly/io/async/ssl:basic_transport_certificate",
        "fbsource//xplat/folly/io/async/ssl:openssl_utils",
        "fbsource//xplat/folly/io/async/ssl:ssl_errors",
        "fbsource//xplat/folly/io/async/ssl:tls_definitions",
        "fbsource//xplat/folly/lang:bits",
        "fbsource//xplat/folly/lang:checked_math",
        "fbsource//xplat/folly/lang:exception",
        "fbsource//xplat/folly/lang:rvalue_reference_wrapper",
        "fbsource//xplat/folly/lang:uncaught_exceptions",
        "fbsource//xplat/folly/logging:init",
        "fbsource//xplat/folly/logging:init_weak",
        "fbsource//xplat/folly/logging:log_handler",
        "fbsource//xplat/folly/logging:log_level",
        "fbsource//xplat/folly/logging:log_name",
        "fbsource//xplat/folly/logging:logging",
        "fbsource//xplat/folly/logging:rate_limiter",
        "fbsource//xplat/folly/memory:arena",
        "fbsource//xplat/folly/memory:malloc",
        "fbsource//xplat/folly/net:tcpinfo",
        "fbsource//xplat/folly/net:tcpinfo_dispatcher",
        "fbsource//xplat/folly/portability:asm",
        "fbsource//xplat/folly/portability:atomic",
        "fbsource//xplat/folly/portability:builtins",
        "fbsource//xplat/folly/portability:dirent",
        "fbsource//xplat/folly/portability:event",
        "fbsource//xplat/folly/portability:fcntl",
        "fbsource//xplat/folly/portability:gflags",
        "fbsource//xplat/folly/portability:gmock",
        "fbsource//xplat/folly/portability:gtest",
        "fbsource//xplat/folly/portability:iovec",
        "fbsource//xplat/folly/portability:math",
        "fbsource//xplat/folly/portability:openssl",
        "fbsource//xplat/folly/portability:pthread",
        "fbsource//xplat/folly/portability:stdlib",
        "fbsource//xplat/folly/portability:sys_mman",
        "fbsource//xplat/folly/portability:sys_resource",
        "fbsource//xplat/folly/portability:sys_stat",
        "fbsource//xplat/folly/portability:sys_syscall",
        "fbsource//xplat/folly/portability:sys_time",
        "fbsource//xplat/folly/portability:syslog",
        "fbsource//xplat/folly/portability:time",
        "fbsource//xplat/folly/portability:windows",
        "fbsource//xplat/folly/ssl:openssl_cert_utils",
        "fbsource//xplat/folly/ssl:openssl_hash",
        "fbsource//xplat/folly/ssl:openssl_ptr_types",
        "fbsource//xplat/folly/ssl:ssl_session",
        "fbsource//xplat/folly/ssl:ssl_session_manager",
        "fbsource//xplat/folly/synchronization:call_once",
        "fbsource//xplat/folly/synchronization:hazptr",
        "fbsource//xplat/folly/synchronization:lifo_sem",
        "fbsource//xplat/folly/synchronization:micro_spin_lock",
        "fbsource//xplat/folly/synchronization:pico_spin_lock",
        "fbsource//xplat/folly/synchronization:rcu",
        "fbsource//xplat/folly/synchronization:small_locks",
        "fbsource//xplat/folly/system:thread_id",
        "fbsource//xplat/folly/system:thread_name",
        "fbsource//xplat/folly/tracing:scoped_trace_section",
        "fbsource//xplat/folly/tracing:static_tracepoint",
        "fbsource//xplat/third-party/event:event",
        "fbsource//xplat/third-party/linker_lib:atomic",
        "fbsource//xplat/third-party/openssl:crypto",
        "fbsource//xplat/third-party/openssl:ssl",
        ":f14_test_util",
        ":tracking_types",
        "//xplat/folly:benchmark",
        "//xplat/folly:conv",
        "//xplat/folly:fbstring",
        "//xplat/folly:portability",
        "//xplat/folly:test-headers",
        "//xplat/folly:test_test_utils",
        "//xplat/folly/container:f14_hash",
        "//xplat/third-party/linker_lib:atomic",
    ],
    exported_deps = [
        "fbsource//xplat/folly/hash:hash",
        "fbsource//xplat/folly/portability:asm",
        "//xplat/folly:function",
        "//xplat/folly/container/detail:f14_hash_detail",
        "//xplat/folly/lang:safe_assert",
    ],
)

non_fbcode_target(
    _kind = folly_xplat_cxx_test,
    name = "iterator_test",
    srcs = ["IteratorTest.cpp"],
    deps = [
        "fbsource//xplat/folly/portability:gtest",
        "//xplat/folly/container:iterator",
    ],
)

non_fbcode_target(
    _kind = folly_xplat_cxx_test,
    name = "range_traits_test",
    srcs = ["range_traits_test.cpp"],
    deps = [
        "fbsource//xplat/folly/portability:gtest",
        "//xplat/folly/container:range_traits",
    ],
)

non_fbcode_target(
    _kind = folly_xplat_cxx_test,
    name = "regex_match_cache_test",
    srcs = ["RegexMatchCacheTest.cpp"],
    deps = [
        "fbsource//xplat/folly/portability:gmock",
        "fbsource//xplat/folly/portability:gtest",
        "//third-party/fmt:fmt",
        "//xplat/folly:portability",
        "//xplat/folly:utility",
        "//xplat/folly/container:f14_hash",
        "//xplat/folly/container:regex_match_cache",
        "//xplat/folly/container:sorted_vector_types",
        "//xplat/folly/container:span",
        "//xplat/folly/lang:keep",
    ],
)

non_fbcode_target(
    _kind = folly_xplat_cxx_test,
    name = "span_test",
    srcs = ["span_test.cpp"],
    deps = [
        "fbsource//xplat/folly/portability:gmock",
        "fbsource//xplat/folly/portability:gtest",
        "//xplat/folly/container:span",
    ],
)

non_fbcode_target(
    _kind = folly_xplat_cxx_test,
    name = "std_bitset_test",
    srcs = ["StdBitsetTest.cpp"],
    deps = [
        "fbsource//third-party/googletest:gtest",
        "fbsource//xplat/folly/portability:gtest",
        "//xplat/folly/container:std_bitset",
    ],
)

non_fbcode_target(
    _kind = folly_xplat_cxx_test,
    name = "tape_test",
    srcs = ["tape_test.cpp"],
    deps = [
        "fbsource//xplat/folly/portability:gmock",
        "fbsource//xplat/folly/portability:gtest",
        "//xplat/folly:small_vector",
        "//xplat/folly/container:tape",
    ],
)

non_fbcode_target(
    _kind = folly_xplat_cxx_test,
    name = "vector_bool_test",
    srcs = ["vector_bool_test.cpp"],
    deps = [
        "//xplat/folly:memory",
        "//xplat/folly/container:vector_bool",
        "//xplat/folly/container/detail:bool_wrapper",
        "//xplat/folly/memory:memory_resource",
    ],
)

# !!!! fbcode/folly/container/test/TARGETS was merged into this file, see https://fburl.com/workplace/xl8l9yuo for more info !!!!

fbcode_target(
    _kind = cpp_unittest,
    name = "access_test",
    srcs = ["AccessTest.cpp"],
    headers = [],
    deps = [
        "//folly/container:access",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "array_test",
    srcs = ["ArrayTest.cpp"],
    headers = [],
    supports_static_listing = False,
    deps = [
        "//folly/container:array",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_benchmark,
    name = "bit_iterator_bench",
    srcs = ["BitIteratorBench.cpp"],
    headers = [],
    deps = [
        "//folly:benchmark",
        "//folly:small_vector",
        "//folly/container:bit_iterator",
        "//folly/init:init",
    ],
    external_deps = [
        "glog",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "bit_iterator_test",
    srcs = ["BitIteratorTest.cpp"],
    headers = [],
    deps = [
        "//folly/container:bit_iterator",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "enumerate_test",
    srcs = ["EnumerateTest.cpp"],
    headers = [],
    deps = [
        "//folly:range",
        "//folly/container:enumerate",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_benchmark,
    name = "evicting_cache_map_bench",
    srcs = ["EvictingCacheMapBench.cpp"],
    headers = [],
    deps = [
        "//folly:benchmark",
        "//folly/container:evicting_cache_map",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "evicting_cache_map_test",
    srcs = ["EvictingCacheMapTest.cpp"],
    headers = [],
    allocator = "jemalloc_debug",
    deps = [
        "//folly/container:evicting_cache_map",
        "//folly/portability:gtest",
    ],
)

fb_dirsync_cpp_library(
    name = "f14_test_util",
    headers = [
        "F14TestUtil.h",
    ],
    feature = triage_InfrastructureSupermoduleOptou,
    xplat_impl = folly_xplat_library,
    exported_deps = [
        "//folly/container/detail:f14_hash_detail",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "f14_fwd_test",
    srcs = [
        "F14FwdTest.cpp",
    ],
    deps = [
        "//folly/container:f14_hash_fwd",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "f14_map_test",
    srcs = [
        "F14MapTest.cpp",
    ],
    deps = [
        ":f14_test_util",
        ":tracking_types",
        "//folly:benchmark",
        "//folly:conv",
        "//folly:fbstring",
        "//folly:portability",
        "//folly/container:f14_hash",
        "//folly/hash:hash",
        "//folly/portability:gtest",
        "//folly/test:test_utils",
    ],
    external_deps = [
        "glog",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "f14_map_fallback_test",
    srcs = [
        "F14MapTest.cpp",
    ],
    preprocessor_flags = ["-DFOLLY_F14_FORCE_FALLBACK=1"],
    deps = [
        ":f14_test_util",
        ":tracking_types",
        "//folly:benchmark",
        "//folly:conv",
        "//folly:fbstring",
        "//folly:portability",
        "//folly/container:f14_hash",
        "//folly/hash:hash",
        "//folly/portability:gtest",
        "//folly/test:test_utils",
    ],
    external_deps = [
        "glog",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "f14_policy_test",
    srcs = [
        "F14PolicyTest.cpp",
    ],
    deps = [
        "//folly/container:f14_hash",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "f14_set_test",
    srcs = [
        "F14SetTest.cpp",
    ],
    deps = [
        ":f14_test_util",
        ":tracking_types",
        "//folly:benchmark",
        "//folly:conv",
        "//folly:fbstring",
        "//folly:portability",
        "//folly/container:f14_hash",
        "//folly/lang:keep",
        "//folly/portability:gtest",
        "//folly/test:test_utils",
    ],
    external_deps = [
        "glog",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "f14_set_fallback_test",
    srcs = [
        "F14SetTest.cpp",
    ],
    preprocessor_flags = ["-DFOLLY_F14_FORCE_FALLBACK=1"],
    deps = [
        ":f14_test_util",
        ":tracking_types",
        "//folly:benchmark",
        "//folly:conv",
        "//folly:fbstring",
        "//folly:portability",
        "//folly/container:f14_hash",
        "//folly/lang:keep",
        "//folly/portability:gtest",
        "//folly/test:test_utils",
    ],
    external_deps = [
        "glog",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "heap_vector_types_test",
    srcs = ["heap_vector_types_test.cpp"],
    headers = [],
    deps = [
        "//folly:random",
        "//folly:range",
        "//folly:small_vector",
        "//folly:utility",
        "//folly/container:heap_vector_types",
        "//folly/memory:malloc",
        "//folly/portability:gmock",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "f14_interprocess_test",
    srcs = [
        "F14InterprocessTest.cpp",
    ],
    deps = [
        "fbsource//third-party/fmt:fmt",
        "//folly:random",
        "//folly:traits",
        "//folly/container:f14_hash",
        "//folly/portability:gtest",
    ],
    external_deps = [
        ("boost", None, "boost_interprocess"),
        ("glibc", None, "rt"),  # @manual
    ],
)

fbcode_target(
    _kind = cpp_binary,
    name = "f14_small_overheads",
    srcs = [
        "F14SmallOverheads.cpp",
    ],
    deps = [
        "//folly/container:f14_hash",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "f14_asan_support_test",
    srcs = [
        "F14AsanSupportTest.cpp",
    ],
    deps = [
        "//folly:portability",
        "//folly/container:f14_hash",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_benchmark,
    name = "foreach_benchmark",
    srcs = ["ForeachBenchmark.cpp"],
    headers = [],
    deps = [
        "//folly:benchmark",
        "//folly:random",
        "//folly/container:enumerate",
        "//folly/container:foreach",
        "//folly/init:init",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "foreach_test",
    srcs = ["ForeachTest.cpp"],
    headers = [],
    deps = [
        "//folly/container:foreach",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "heterogeneous_access_test",
    srcs = [
        "HeterogeneousAccessTest.cpp",
    ],
    deps = [
        "//folly:fbstring",
        "//folly:portability",
        "//folly:range",
        "//folly:small_vector",
        "//folly:traits",
        "//folly/container:heterogeneous_access",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "iterator_test",
    srcs = ["IteratorTest.cpp"],
    headers = [],
    deps = [
        "//folly/container:iterator",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "merge_test",
    srcs = ["MergeTest.cpp"],
    headers = [],
    deps = [
        "//folly/container:merge",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "range_traits_test",
    srcs = ["range_traits_test.cpp"],
    headers = [],
    deps = [
        "//folly/container:range_traits",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "regex_match_cache_test",
    srcs = ["RegexMatchCacheTest.cpp"],
    deps = [
        "fbsource//third-party/fmt:fmt",
        "//folly:portability",
        "//folly:utility",
        "//folly/container:f14_hash",
        "//folly/container:regex_match_cache",
        "//folly/container:sorted_vector_types",
        "//folly/container:span",
        "//folly/lang:keep",
        "//folly/portability:gmock",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "span_test",
    srcs = ["span_test.cpp"],
    headers = [],
    supports_static_listing = False,
    deps = [
        "//folly/container:span",
        "//folly/portability:gmock",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_benchmark,
    name = "sparse_byte_set_benchmark",
    srcs = ["SparseByteSetBenchmark.cpp"],
    headers = [],
    deps = [
        "fbsource//third-party/fmt:fmt",
        "//folly:benchmark",
        "//folly:format",
        "//folly/container:sparse_byte_set",
        "//folly/portability:gflags",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "sparse_byte_set_test",
    srcs = ["SparseByteSetTest.cpp"],
    headers = [],
    deps = [
        "//folly/container:sparse_byte_set",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_benchmark,
    name = "std_bitset_benchmark",
    srcs = ["StdBitsetBenchmark.cpp"],
    headers = [],
    deps = [
        "//folly:benchmark",
        "//folly:random",
        "//folly/container:std_bitset",
        "//folly/init:init",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "std_bitset_test",
    srcs = ["StdBitsetTest.cpp"],
    deps = [
        "//folly/container:std_bitset",
    ],
)

fb_dirsync_cpp_library(
    name = "tracking_types",
    headers = [
        "TrackingTypes.h",
    ],
    feature = triage_InfrastructureSupermoduleOptou,
    xplat_impl = folly_xplat_library,
    exported_deps = [
        "//folly:function",
        "//folly/hash:hash",
        "//folly/lang:safe_assert",
        "//folly/portability:asm",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "tape_test",
    srcs = ["tape_test.cpp"],
    deps = [
        "//folly:small_vector",
        "//folly/container:tape",
        "//folly/portability:gmock",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_benchmark,
    name = "tape_bench",
    srcs = ["tape_bench.cpp"],
    deps = [
        "//folly:benchmark",
        "//folly/container:tape",
        "//folly/init:init",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "util_test",
    srcs = ["UtilTest.cpp"],
    headers = [],
    deps = [
        "//folly:optional",
        "//folly:range",
        "//folly/container/detail:util",
        "//folly/container/test:tracking_types",
        "//folly/portability:gtest",
    ],
    external_deps = [
        "glog",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "weighted_evicting_cache_map_test",
    srcs = ["WeightedEvictingCacheMapTest.cpp"],
    headers = [],
    allocator = "jemalloc_debug",
    deps = [
        "//folly/container:weighted_evicting_cache_map",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "intrusive_heap_test",
    srcs = ["IntrusiveHeapTest.cpp"],
    headers = [],
    deps = [
        "//folly:random",
        "//folly/container:intrusive_heap",
        "//folly/portability:gflags",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_binary,
    name = "hash_maps_bench",
    srcs = ["HashMapsBench.cpp"],
    headers = [],
    deps = [
        "fbsource//third-party/fmt:fmt",
        "//folly:benchmark",
        "//folly:conv",
        "//folly:format",
        "//folly:function",
        "//folly:random",
        "//folly/container:f14_hash",
        "//folly/hash:hash",
        "//folly/init:init",
        "//folly/portability:gflags",
    ],
    external_deps = [
        "glog",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "reserve_test",
    srcs = ["ReserveTest.cpp"],
    deps = [
        "//folly/container:f14_hash",
        "//folly/container:reserve",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_benchmark,
    name = "fbvector_benchmark",
    srcs = ["FBVectorBenchmark.cpp"],
    headers = ["FBVectorBenchmarks.cpp.h"],
    args = [
        "--json",
    ],
    deps = [
        "//folly:benchmark",
        "//folly:fbvector",
        "//folly:small_vector",
        "//folly:traits",
        "//folly/container:foreach",
        "//folly/portability:gflags",
        "//folly/test:fbvector_test_util",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "fbvector_test",
    srcs = ["FBVectorTest.cpp"],
    headers = [
        "FBVectorTests.cpp.h",
    ],
    deps = [
        "//folly:fbstring",
        "//folly:fbvector",
        "//folly:random",
        "//folly:traits",
        "//folly/container:foreach",
        "//folly/portability:gtest",
        "//folly/test:fbvector_test_util",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "map_util_test",
    srcs = ["MapUtilTest.cpp"],
    headers = [],
    deps = [
        "//folly:map_util",
        "//folly:sorted_vector_types",
        "//folly:traits",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "small_vector_test",
    srcs = ["small_vector_test.cpp"],
    headers = [],
    supports_static_listing = False,
    deps = [
        "fbsource//third-party/fmt:fmt",
        "//folly:conv",
        "//folly:small_vector",
        "//folly:sorted_vector_types",
        "//folly:traits",
        "//folly/container:iterator",
        "//folly/portability:gtest",
    ],
    external_deps = [
        ("boost", None, "boost_algorithm"),
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "sorted_vector_types_test",
    srcs = ["sorted_vector_test.cpp"],
    headers = [],
    deps = [
        "//folly:optional",
        "//folly:range",
        "//folly:sorted_vector_types",
        "//folly:utility",
        "//folly/memory:malloc",
        "//folly/portability:gmock",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "vector_bool_test",
    srcs = ["vector_bool_test.cpp"],
    headers = [],
    deps = [
        "//folly:memory",
        "//folly/container:vector_bool",
        "//folly/container/detail:bool_wrapper",
        "//folly/memory:memory_resource",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "collection_util_test",
    srcs = ["CollectionUtilTest.cpp"],
    headers = [],
    deps = [
        "//folly:small_vector",
        "//folly:sorted_vector_types",
        "//folly/container:collection_util",
        "//folly/container:f14_hash",
        "//folly/json:dynamic",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "irange_test",
    srcs = ["IRangeTest.cpp"],
    headers = [],
    deps = [
        "fbsource//third-party/googletest:gtest",
        "//folly/container:irange",
    ],
)
